﻿$(function () {
    $("#records").ggrid({
        url: '/Console/GridLoad',
        dataType: 'json',
        columns: [
		    { display: 'FirstName', name: 'FirstName', width: 40, sortable: true, align: 'left' },
		    { display: 'LastName', name: 'LastName', width: 180, sortable: true, align: 'left' },
		    { display: 'Email', name: 'Email', width: 120, sortable: true, align: 'left' },
            { display: 'IsActive', name: 'IsActive', width: 120, sortable: true, align: 'left' },
            { display: 'IsLocked', name: 'IsLocked', width: 120, sortable: true, align: 'left' },
		],
        actions: [
		    { idColumn: 'ID', image: '/Content/images/pencil.png', action: '/Console/CreateUser/{0}', showConfirm: false },
		    { idColumn: 'ID', image: '/Content/images/cross.png', action: '/Console/DeleteUser/{0}', showConfirm: true }
		],
        defaultSort: "FirstName",
        defaultSortOrder: "asc",
        usePaging: true,
        pageSize: 10,
        width: 'auto',
        height: 'auto'
    });
});